using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class AuditActionMap : EntityTypeConfiguration<AuditAction>
    {
        public AuditActionMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Action)
                .IsFixedLength()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("AuditAction");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Action).HasColumnName("Action");
        }
    }
}
